<?php
defined('IN_PHPCMS') or exit('No permission resources.');
if(!defined('CACHE_MODEL_PATH')) define('CACHE_MODEL_PATH',PHPCMS_PATH.'caches'.DIRECTORY_SEPARATOR.'caches_model'.DIRECTORY_SEPARATOR.'caches_data'.DIRECTORY_SEPARATOR);

pc_base::load_sys_class('model', '', 0);
class reg_auth_model extends model {
	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'reg_auth';
		parent::__construct();
	}

	/**
	 * 取不是管理员的赛区信息
	 */
	public function getNoAdminList ()
	{
		//取赛区
		$model_setting=pc_base::load_model('site_setting_model');
		$districts = $model_setting->getValue("contest_district",get_siteid());
		$regList = array();
		$list = $this->select(array('userid'=>$_SESSION['userid']));
		foreach ($list as $v) {
			$regList[$v['contest_district']] = $districts[$v['contest_district']];
		}
		return $regList;
	}
}
?>